package io.github.luyanfei

class Quiz {
  String name,intro
  Date timeOpen,timeClose
  int timeLimit
  Boolean shuffleQuestions
  //sumGrades是各题相加的分数，而grade是测验创建者设定的分数。
  double sumGrades,grade
  Date dateCreated,lastUpdated
  User createdBy,modifiedBy
  
  static hasMany = [questions:Question,quizAttempts:QuizAttempt]
  static constraints = {
    name blank: false
    createdBy nullable: true
    modifiedBy nullable: true
    questions nullable: true
    quizAttempts nullable: true
  }
}
